<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>个人资料</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta http-equiv="Cache-Control" content="no-transform">
		<meta name="format-detection" content="telephone=no">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<link rel="stylesheet" href="style/css/basic.css" />
		<link rel="stylesheet" href="style/css/personal_data.css" />
		<script type="text/javascript" src="style/plugin/mui/js/mui.min.js"></script>
		<script type="text/javascript" src="style/js/jquery-1.8.3.min.js" ></script>
		<script type="text/javascript" src="style/mockjs/dist/mock.js"></script>
		<script type="text/javascript" src="style/js/vue.min.js"></script>
		<script type="text/javascript" src="style/js/vue-resource.js"></script>
		<script type="text/javascript" src="style/js/basic.js"></script>
	</head>
	<body>
		<!--header-->
		<div id="header">
			<h1>设置</h1>
			<span class="backicon"></span>
			
		</div>
		<div class="body">
			<ul class="listli">
				<!--<li>
					<a href="product.html"><span>更改头像</span></a>
				</li>-->
				<li id="pwd">
					<a href="javascript:;"><span>修改密码</span></a>
				</li>
				<!--<li id="tel">
					<a href="javascript:;"><span>修改手机号</span></a>
				</li>-->
			</ul>
			<div class="maxwidth btn" id="exit">
				<a href="javascript:;">退出当前账户</a>
			</div>
		</div>
		<script> 
			mui.plusReady(function(){
				var pwd=document.getElementById("pwd");
				var tel=document.getElementById("tel");
				var ticket=localStorage.getItem("tick")
                var sign=localStorage.getItem("sig");
                var exit=document.getElementById("exit"); 
				pwd.addEventListener("tap",function(){
					openurl("new_password")
				})
//				tel.addEventListener("tap",function(){
//					openurl("new_phone")
//				})
				exit.addEventListener("tap",function(){//退出登录
					mui.ajax(domain+"/user/logout?t="+ticket+"&sign="+sign,{
				    	dataType:"json",
				    	type:"post",
				    	timeout:10000,
				    	headers:{'Content-Type':'application/json'},
				    	success:function(data){	  
				    		if(data.code==1){
//				    			alert("1")
				    			localStorage.clear();
				    			plus.runtime.restart()
				    			
				    		}else if(data.code==0){
				    			mui.toast("退出失败，请稍后重试",{duration:"short"})
				    		}
				    	},
				    	error:function(xhr,type,errorThrown){
//				    		alert(type)
				    	}
				    })
				})
			})
		</script>
	</body>
</html>
